import re

import requests

resp = requests.get('https://sohu.com/index.html')
# cookies = resp.cookies
# resp = requests.get('...', cookies=cookies)
if resp.status_code == 200:
    pattern = re.compile(r'\<a\s.*?href=\"(.*?)\".*?\>')
    results = pattern.findall(resp.text)
    for result in results:
        print(result)
else:
    print('无法获取页面')
